home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 18 / CU Amiga Magazine's Super CD-ROM 18 (1997)(EMAP Images)(GB)[!][issue 1998-01].iso / CUCD / Magazine / UltimateWB / VisualPrefs / Install < prev    next >
Encoding:
Text File  |  1997-10-19  |  12.2 KB  |  456 lines

  1. ;** $VER: VisualPrefsBeta_install 40.10 (7.5.97) by Nik Soggia <nsoggia@telnetwork.it>
  2. ;**
  3. ;** modified (17.5.97) by Massimo Tantignone
  4. ;** modified (13.6.97) by Massimo Tantignone
  5. ;** modified (19.7.97) by Massimo Tantignone
  6. ;** modified (21.7.97) by Massimo Tantignone
  7. ;** modified (24.7.97) by Massimo Tantignone
  8. ;** modified (26.7.97) by Massimo Tantignone
  9. ;** modified (19.10.97) by Massimo Tantignone
  10. ;**
  11. ;** requires:
  12. ;** - RexxMast, Rx and Search commands
  13. ;** - T: and ENV: assignments for temporary files
  14.  
  15. ;***************************************
  16. ;** MESSAGES (DEFAULT: ENGLISH)
  17.  
  18. (set msg_rx     "Installer is unable to locate the \"Rx\" command")
  19. (set msg_rxm    "Installer is unable to locate the \"RexxMast\" command")
  20. (set msg_rxp    "Please locate it:")
  21. (set msg_wait   "Checking installation")
  22. (set msg_vpi    "A copy of VisualPrefs is already installed")
  23. (set msg_vpn    "VisualPrefs is not installed")
  24. (set msg_dir    "A drawer WILL NOT be created")
  25. (set msg_seldr  "Select the destination drawer:")
  26. (set msg_selcpu "Select the version of VisualPrefs you want to install.")
  27. (set msg_whdoc  "Where do you want to copy the documentation files?")
  28. (set msg_lang   "What language catalogs do you want to install?")
  29. (set msg_cpu000 "68000")
  30. (set msg_cpu020 "68020/030")
  31. (set msg_cpu040 "68040/060")
  32. (set msg_l_ita  "Italiano")
  33. (set msg_icoo   "Normal icons")
  34. (set msg_icon   "NewIcons")
  35. (set msg_icom   "Magic WB")
  36. (set msg_icoi   "Iconographics")
  37. (set msg_icop   "Select icon set")
  38. (set msg_exa    "Install example preferences?")
  39. (set msg_done   "VisualPrefs will be available next time you boot.")
  40. (set msg_done2  "\n\nIf you use them, you should remove Prop3D and\nCenterTitles from your User-startup.")
  41. (set rxhelp     "Use the file requester to select the \"Rx\" program.")
  42. (set rxmhelp    "Use the file requester to select the \"RexxMast\" program.")
  43. (set dirhelp    "Select the drawer into which VisualPrefs is to be copied.\nIt should reside in the system command path.")
  44. (set dirhelp2   "Select the drawer into which the documentation is to be copied.\nThe default is the same drawer which VisualPrefs resides in.")
  45. (set cpuhelp    "If you have an accelerated Amiga, you can choose to\ninstall a more optimized version of VisualPrefs and\nits preferences editor.")
  46. (set langhelp   "Choose one or more languages for VisualPrefs and the GUI editor.\nYou can later select which one to use with the Locale preferences editor.")
  47. (set iconhelp   "Choose the style for the icons to be installed.")
  48. (set exahelp    "If you select \"Yes\", an example preferences file (preset) will be copied into your SYS:Prefs/Presets drawer.")
  49. (set var_docd   "DocsEnglish")
  50. (set var_docr   "VisualPrefs.guide")
  51. ;(set var_docc   "Changes")
  52.  
  53. ;***************************************
  54. ;** MESSAGES (ITALIANO)
  55.  
  56. (if (= @language   "italiano")(
  57.    (set msg_rx     "Installer non è in grado di trovare il comando \"Rx\"")
  58.    (set msg_rxm    "Installer non è in grado di trovare il comando \"RexxMast\"")
  59.    (set msg_rxp    "Per favore, localizzatelo:")
  60.    (set msg_wait   "Verifica installazione")
  61.    (set msg_vpi    "Una copia di VisualPrefs è già installata")
  62.    (set msg_vpn    "VisualPrefs non è installato")
  63.    (set msg_dir    "NON verrà creato alcun cassetto")
  64.    (set msg_seldr  "Scegliere il cassetto di destinazione:")
  65.    (set msg_selcpu "Scegliere la versione di VisualPrefs da installare.")
  66.    (set msg_whdoc  "Dove volete che siano copiati i file della documentazione?")
  67.    (set msg_lang   "Per quali lingue deve essere installato un catalog?")
  68.    (set msg_cpu000 "68000")
  69.    (set msg_cpu020 "68020/030")
  70.    (set msg_cpu040 "68040/060")
  71.    (set msg_l_ita  "Italiano")
  72.    (set msg_icoo   "Normali")
  73.    (set msg_icon   "NewIcons")
  74.    (set msg_icom   "Magic WB")
  75.    (set msg_icoi   "Iconographics")
  76.    (set msg_icop   "Selezionare il set di icone")
  77.    (set msg_exa    "Installare preferenze di esempio?")
  78.    (set msg_done   "VisualPrefs sarà disponibile dopo il prossimo reboot.")
  79.    (set msg_done2  "\n\nSe li usate, dovreste rimuovere Prop3D e\nCenterTitles dalla vostra User-startup.")
  80.    (set rxhelp     "Usate il file requester per selezionare il programma \"Rx\".")
  81.    (set rxmhelp    "Usate il file requester per selezionare il programma \"RexxMast\".")
  82.    (set dirhelp    "Selezionare il cassetto in cui deve essere copiato VisualPrefs.\nDovrebbe trovarsi nel path dei comandi di sistema.")
  83.    (set dirhelp2   "Selezionare il cassetto in cui deve essere copiata la documentazione.\nIl default è lo stesso cassetto in cui si trova VisualPrefs.")
  84.    (set cpuhelp    "Se avete un Amiga accelerato potete scegliere di\ninstallare versioni più ottimizzate di VisualPrefs\ne del suo editor di preferenze.")
  85.    (set langhelp   "Scegliere una o più lingue per VisualPrefs e l'editor GUI.\nIn seguito si potrà scegliere quale usare con l'editor di preferenze Locale.")
  86.    (set iconhelp   "Scegliere lo stile per le icone da installare.")
  87.    (set exahelp    "Selezionando \"Sì\" verrà copiato un file di preferenze di esempio (preset) nel vostro cassetto SYS:Prefs/Presets.")
  88.    (set var_docd   "DocsItaliano")
  89.    (set var_docr   "VisualPrefs.guide")
  90.    ;(set var_docc   "Cambiamenti")
  91. ))
  92.  
  93. ;***************************************
  94. ;** LOCATE AREXX PROGRAMS
  95.  
  96. (if (= 1 (exists "sys:rexxc/rx" (noreq)))
  97.    (set var_rx "sys:rexxc/rx")
  98.    (if (= 1 (exists "c:rx" (noreq)))
  99.       (set var_rx "c:rx")
  100.       (set var_rx
  101.          (askfile
  102.             (default "SYS:RexxC/Rx")
  103.             (help rxhelp)
  104.             (prompt msg_rx ".\n\n" msg_rxp)
  105.          )
  106.       )
  107.    )
  108. )
  109.  
  110. (set var_rxm (tackon (pathonly var_rx) "rexxmast"))
  111.  
  112. (if (= 0 (exists var_rxm (noreq)))
  113.    (if (= 1 (exists "sys:rexxc/rexxmast" (noreq)))
  114.       (set var_rxm "sys:rexxc/rexxmast")
  115.       (if (= 1 (exists "c:rexxmast" (noreq)))
  116.          (set var_rxm "c:rexxmast")
  117.          (if (= 1 (exists "sys:system/rexxmast" (noreq)))
  118.             (set var_rxm "sys:system/rexxmast")
  119.             (set var_rxm
  120.                (askfile
  121.                   (default "SYS:System/RexxMast")
  122.                   (help rxmhelp)
  123.                   (prompt msg_rxm ".\n\n" msg_rxp)
  124.                )
  125.             )
  126.          )
  127.       )
  128.    )
  129. )
  130.  
  131. (run var_rxm)
  132.  
  133. ;***************************************
  134. ;** CHECK PREVIOUS INSTALLATION
  135.  
  136. (working "(" msg_wait ")")
  137.  
  138. (delete "t:installvp.rx" (optional force) (safe))
  139. (textfile
  140.    (safe)
  141.    (dest "t:installvp.rx")
  142.    (append (cat
  143.       "/* filter */\n"
  144.       "\n"
  145.       "pull string\n"
  146.       "\n"
  147.       "comment=pos(';',string)\n"
  148.       "if comment~==0 then string=trim(left(string,comment-1))\n"
  149.       "say right(string,length(string)-lastpos(' ',string))\n"
  150.    ))
  151. )
  152.  
  153. (delete "t:installvp.sh" (optional force) (safe))
  154. (textfile
  155.    (safe)
  156.    (dest "t:installvp.sh")
  157.    (append (cat
  158.       "delete force t:installvp.out\n"
  159.       "\n"
  160.       "search >t:installvp.out search visualprefs S:Startup-sequence\n"
  161.       "if $RC eq 0\n"
  162.       "   setenv installvp_vp 1\n"
  163.       "   setenv installvp_vpp `" var_rx " <t:installvp.out t:installvp.rx`\n"
  164.       "else\n"
  165.       "   setenv installvp_vp 0\n"
  166.       "   setenv installvp_vpp \"\"\n"
  167.       "endif\n"
  168.       "delete t:installvp.out\n"
  169.       "\n"
  170.    ))
  171. )
  172.  
  173. (execute "t:installvp.sh" (safe))
  174. (delete "t:installvp.rx" (safe))
  175. (delete "t:installvp.sh" (safe))
  176.  
  177. (set var_vp (getenv "installvp_vp"))
  178. (set var_vpp (getenv "installvp_vpp"))
  179. (run "unsetenv installvp_vp")
  180. (run "unsetenv installvp_vpp")
  181.  
  182. (if (= 1 var_vp)
  183.    (
  184.       (set @default-dest (pathonly var_vpp))
  185.       (set msg_vp msg_vpi)
  186.    )
  187.    (set msg_vp msg_vpn)
  188. )
  189.  
  190. (complete 5)
  191.  
  192. (set no_break_warning
  193.    (askdir
  194.       (default @default-dest)
  195.       (help dirhelp)
  196.       (prompt (cat msg_vp ".\n" msg_dir ".\n\n" msg_seldr))
  197.    )
  198. )
  199. (set @default-dest (tackon no_break_warning ""))
  200.  
  201. (set docdir
  202.    (askdir
  203.       (default @default-dest)
  204.       (help dirhelp2)
  205.       (prompt (cat msg_whdoc "\n\n" msg_seldr))
  206.    )
  207. )
  208. (set docdir (tackon docdir ""))
  209.  
  210. ;***************************************
  211. ;** ASK INSTALLATION PREFERENCES
  212.  
  213. (complete 10)
  214.  
  215. (set var_cpu
  216.    (askchoice
  217.       (prompt msg_selcpu)
  218.       (help cpuhelp)
  219.       (choices msg_cpu000 msg_cpu020 msg_cpu040)
  220.    )
  221. )
  222.  
  223. (complete 12)
  224.  
  225. (set var_lang
  226.    (askoptions
  227.       (prompt msg_lang)
  228.       (help langhelp)
  229.       (choices msg_l_ita)
  230.       (default 1)
  231.    )
  232. )
  233.  
  234. (complete 14)
  235.  
  236. (set var_icon
  237.    (askchoice
  238.       (prompt msg_icop)
  239.       (help iconhelp)
  240.       (choices msg_icoo msg_icon msg_icom msg_icoi)
  241.    )
  242. )
  243.  
  244. (complete 16)
  245.  
  246. (set var_exa
  247.    (askbool
  248.       (prompt msg_exa)
  249.       (help exahelp)
  250.    )
  251. )
  252.  
  253. ;***************************************
  254. ;** INSTALL FILES: VISUALPREFS
  255.  
  256. (complete 20)
  257.  
  258. (copyfiles
  259.    (source "VisualPrefs")
  260.    (dest "RAM:")
  261.    (newname "VP_000")
  262.    (safe)
  263. )
  264.  
  265. (if (= 0 var_cpu)(
  266.    (copyfiles (source "RAM:VP_000") (dest "RAM:") (newname "VisualPrefs") (safe))
  267. ))
  268.  
  269. (if (= 1 var_cpu)(
  270.    (run "InstallTools/SPatch > NIL: -oRAM:VisualPrefs -pInstallFiles/VisualPrefs_020_030.pch RAM:VP_000" (safe))
  271. ))
  272.  
  273. (if (= 2 var_cpu)(
  274.    (run "InstallTools/SPatch > NIL: -oRAM:VisualPrefs -pInstallFiles/VisualPrefs_040_060.pch RAM:VP_000" (safe))
  275. ))
  276.  
  277. (delete "RAM:VP_000" (safe))
  278.  
  279. (copyfiles
  280.    (source "RAM:VisualPrefs")
  281.    (dest @default-dest)
  282.    (infos) (noposition)
  283. )
  284.  
  285. (delete "RAM:VisualPrefs" (safe))
  286.  
  287. ;***************************************
  288. ;** INSTALL FILES: DOCUMENTATION
  289.  
  290. (complete 30)
  291.  
  292. (copyfiles
  293.    (source (tackon var_docd ""))
  294.    (dest docdir)
  295.    (all) (infos) (noposition)
  296. )
  297.  
  298. ;***************************************
  299. ;** INSTALL FILES: GUI-PREFS
  300.  
  301. (complete 40)
  302.  
  303. (copyfiles
  304.    (source "Prefs/GUI")
  305.    (dest "RAM:")
  306.    (newname "GUI_000")
  307.    (safe)
  308. )
  309.  
  310. (if (= 0 var_cpu)(
  311.    (copyfiles (source "RAM:GUI_000") (dest "RAM:") (newname "GUI") (safe))
  312. ))
  313.  
  314. (if (= 1 var_cpu)(
  315.    (run "InstallTools/SPatch > NIL: -oRAM:GUI -pInstallFiles/GUI_020_030.pch RAM:GUI_000" (safe))
  316. ))
  317.  
  318. (if (= 2 var_cpu)(
  319.    (run "InstallTools/SPatch > NIL: -oRAM:GUI -pInstallFiles/GUI_040_060.pch RAM:GUI_000" (safe))
  320. ))
  321.  
  322. (delete "RAM:GUI_000" (safe))
  323.  
  324. (copyfiles
  325.    (source "RAM:GUI")
  326.    (dest "SYS:Prefs/")
  327.    (noposition)
  328. )
  329.  
  330. (copyfiles
  331.    (source "Prefs/GUI.info")
  332.    (dest "SYS:Prefs/")
  333.    (noposition)
  334. )
  335.  
  336. (delete "RAM:GUI" (safe))
  337.  
  338. ;***************************************
  339. ;** INSTALL FILES: CATALOGS
  340.  
  341. (complete 50)
  342.  
  343. (if (bitand var_lang 1)
  344.    (
  345.       (copyfiles
  346.          (source "Catalogs/italiano/gui.catalog")
  347.          (dest "LOCALE:Catalogs/italiano/")
  348.       )
  349.    )
  350. )
  351.  
  352. ;***************************************
  353. ;** INSTALL FILES: ICONS
  354.  
  355. (complete 60)
  356.  
  357. (if (= 1 var_icon)(
  358.    (copyfiles
  359.       (source "NewIcons/GUI.info")
  360.       (dest "SYS:Prefs/")
  361.       (noposition)
  362.    )
  363.    (copyfiles
  364.       (source "NewIcons/doc.info")
  365.       (dest docdir)
  366.       (newname (cat var_docr ".info"))
  367.       (noposition)
  368.    )
  369. ;   (copyfiles
  370. ;      (source "NewIcons/doc.info")
  371. ;      (dest docdir)
  372. ;      (newname (cat var_docc ".info"))
  373. ;      (noposition)
  374. ;   )
  375. ))
  376.  
  377. (if (= 2 var_icon)(
  378.    (copyfiles
  379.       (source "MagicWB/GUI.info")
  380.       (dest "SYS:Prefs/")
  381.       (noposition)
  382.    )
  383.    (copyfiles
  384.       (source "MagicWB/doc.info")
  385.       (dest docdir)
  386.       (newname (cat var_docr ".info"))
  387.       (noposition)
  388.    )
  389. ;   (copyfiles
  390. ;      (source "MagicWB/doc.info")
  391. ;      (dest docdir)
  392. ;      (newname (cat var_docc ".info"))
  393. ;      (noposition)
  394. ;   )
  395. ))
  396.  
  397. (if (= 3 var_icon)(
  398.    (copyfiles
  399.       (source "Iconographics/GUI.info")
  400.       (dest "SYS:Prefs/")
  401.       (noposition)
  402.    )
  403.    (copyfiles
  404.       (source "Iconographics/doc.info")
  405.       (dest docdir)
  406.       (newname (cat var_docr ".info"))
  407.       (noposition)
  408.    )
  409. ;   (copyfiles
  410. ;      (source "Iconographics/doc.info")
  411. ;      (dest docdir)
  412. ;      (newname (cat var_docc ".info"))
  413. ;      (noposition)
  414. ;   )
  415. ))
  416.  
  417. ;***************************************
  418. ;** INSTALL FILES: SAMPLE PREFS
  419.  
  420. (complete 70)
  421.  
  422. (if (= 1 var_exa)
  423.    (copyfiles
  424.       (source "Prefs/Presets/")
  425.       (dest "SYS:Prefs/Presets/")
  426.       (all) (infos) (noposition)
  427.    )
  428. )
  429.  
  430. ;***************************************
  431. ;** INSTALL FILES: NEW PREFERENCES FILE
  432.  
  433. ;(complete 80)
  434.  
  435. ;(rename "ENVARC:Sys/gui.prefs" "ENVARC:Sys/beta_gui.prefs")
  436. ;(run "InstallTools/ConvertGUIPrefs > NIL: ENVARC:Sys/beta_gui.prefs ENVARC:Sys/gui.prefs")
  437.  
  438. ;***************************************
  439. ;** STARTUP-SEQUENCE
  440.  
  441. (complete 90)
  442.  
  443. (if (= 0 var_vp)
  444.    (
  445.       (run (cat "InstallTools/AddLine \"" @default-dest "\""))
  446.       (protect "S:Startup-sequence" "+srwd")
  447.    )
  448. )
  449.  
  450. ;***************************************
  451. ;** DONE
  452.  
  453. (complete 100)
  454. (exit (cat "\n" msg_done msg_done2))
  455.  
  456.